package com.daigoudao.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.daigoudao.web.service.IUserService;

public class BrokerScore {
	
	private static Logger logger = LoggerFactory.getLogger(BrokerScore.class);
	
	private IUserService userService;
	
	public IUserService getUserService() {
		return userService;
	}

	public void setUserService(IUserService userService) {
		this.userService = userService;
	}

	public void score(){
		if(logger.isInfoEnabled()){
			logger.info("start init broker score...");
		}
		try {
			boolean result = userService.updateBrokerScore();
			if(result){
				logger.info("broker score process success");
			}
		} catch (Exception e) {
			logger.error("BrokerScore.score: ", e);
		}
		
		if(logger.isInfoEnabled()){
			logger.info("end init broker score...");
		}
	}

}
